from django.conf.urls.defaults import *
from mysite.views import current_datetime,hours_ahead,my_image,unruly_passengers_csv
from mysite.books.feeds import AtomFeeds,RssFeeds
feeds = {
    'atom': AtomFeeds,
    'rss': RssFeeds,
}

urlpatterns = patterns('',
    # Example:
    # (r'^mysite/', include('mysite.foo.urls')),

    # Uncomment this for admin:
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^time/$', current_datetime),
    (r'^time/plus/(\d{1,2})/$', hours_ahead),
    (r'^search/$','mysite.books.views.search'),
    (r'^contact/$','mysite.books.views.contact'),
    (r'^add_publihser/$','mysite.books.views.add_publisher'),
    (r'^image/$',my_image),
    (r'^csv/$',unruly_passengers_csv),
    (r'^feeds/(?P<url>.*)/$','django.contrib.syndication.views.feed',{'feed_dict' : feeds}),

)
